<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">
<f:loadBundle basename="ResourceBundle" var="bundle" />
<h:head>
	<title>#{bundle.title}</title>
	<h:outputStylesheet library="css" name="style.css"></h:outputStylesheet>
</h:head>
<h:body>
	<h1>#{bundle.title}</h1>
	<p>
		<a href="/">Home</a> | <a href="logout">Logout</a>
	</p>
	<h:dataTable id="movies" summary="#{bundle.summary}"
		value="#{helloWorld.movies}" var="movie">
		<f:facet name="caption">
			#{bundle.summary}
		</f:facet>
		<h:column>
			<f:facet name="header">
				#{bundle.movieDirector}
			</f:facet>
			#{movie.director}
		</h:column>
		<h:column>
			<f:facet name="header">
				#{bundle.movieTitle}
			</f:facet>
			#{movie.title}
		</h:column>
		<h:column>
			<f:facet name="header">
				#{bundle.movieYear}
			</f:facet>
			#{movie.year}
		</h:column>
	</h:dataTable>
	<p>
		User Name: #{request.remoteUser} <br />
		User Identifier: #{request.userPrincipal != null ? request.userPrincipal.name : ''} <br />
		User In JavaEEManagers Role: #{request.isUserInRole('JavaEEManagers')} <br />
		Session ID: #{request.getSession(false) != null ? request.getSession(false).id : ''} <br />
		Session Content: <h:outputText rendered="#{request.getSession(false) != null and request.getSession(false).getAttribute('aDate') != null}"
			value="#{request.getSession(false).getAttribute('aDate')}">
			<f:convertDateTime pattern="EEE MMM d HH:mm:ss z YYYY"
				timeZone="Europe/London" />
		</h:outputText>
	</p>
</h:body>
</html>